home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 007 / qbdial.arc / DIAL.ASC next >
Encoding:
Text File  |  1987-02-15  |  23.3 KB  |  626 lines

  1.  
  2.         ' TSR (Memory Resident) Phone or Fax Dialer, 1200 Baud
  3.         ' by Kauko J. Laurinolli 404-981-9550
  4.         ' Feb. 15, 1987
  5.  
  6.         ' Be my quest, use, modify, improve and mutilate this Freebie code the way you wish
  7.         ' No Guarantee of any kind provided
  8.  
  9.         ' STAYRES and MACH2 Copyrighted by Micro-Help
  10.  
  11.         ' Sample Compiled with Qbasic  V2.01, works also with V1.01 or V2.00
  12.         '        Linked   with MS-Link V3.06
  13.  
  14.         ' qb dial.asc/o;
  15.         ' link stayres+dial/e+gwcom,,nul,bcom20+mhlib
  16.  
  17.         ' Program uses EMS memory if available
  18.         ' Activate with Alt X
  19.  
  20.         ' This program uses couple of great programmers utilities:
  21.         '╔═════════════════════════════════════════════════════════════════════╗
  22.         '║   Stay-Res Program Package to Make Basic Program Resident and       ║
  23.         '║   Mach 2   Program Package to Speed-Up Basic                        ║
  24.         '║          Both programs are available from Micro-Help, Inc           ║
  25.         '║             Phone No: 404-973-9272 or 1-800-922-3383                ║
  26.         '╚═════════════════════════════════════════════════════════════════════╝
  27.  
  28.         rem $linesize: 132
  29.         rem $pagesize:  55
  30.         rem $title:    'Phone or Telefax Dialer with Stayres'
  31.  
  32.         defint a-z
  33.  
  34.         dim shared nam$(500)
  35.  
  36.         common shared new.time$,filename$,stack$
  37.         common shared dtaseg,nor,hi,rev,pages,page
  38.         common shared start.line,end.line,last.cursor.line,last.rec
  39.  
  40.         '--------------------------- CALLS ------------------------------------
  41.         'call mhwind(stack$,nor,dtaseg,oper,page,top.row,left.col,bot.row,right.col,buf.no,box,ecode)
  42.         'call mhscr(page,lin$,row,col,colr)
  43.         'call hotkey(oper,kscan,kshift,ecode)
  44.         '----------------------------------------------------------------------
  45.         scr.buffer$ = space$(4050)             'reserve memory
  46.         kshift      = varptr(scr.buffer$)      'get segment address
  47.  
  48.         stack$="": page= 0
  49.  
  50.         '--- get monitor type
  51.         call get.monitor (last.monitor,nor,hi,rev,curs.normal,curs.insert,start.line,end.line)
  52.  
  53.         filename$="TELEFAX.NUM"
  54.  
  55.  
  56.         '-------------------------- PRINT MESSAGE -----------------------------
  57.  
  58.         cls
  59.         call mhscr(page,"╔══════════════════════╗", 1, 1, 7)
  60.         call mhscr(page,"║   Resident FAX or    ║", 2, 1, 7)
  61.         call mhscr(page,"║     Phone Dialer     ║", 3, 1, 7)
  62.         call mhscr(page,"║    by Micro-Help     ║", 4, 1, 7)
  63.         call mhscr(page,"║       and KJL        ║", 5, 1, 7)
  64.         call mhscr(page,"║     Version 1.11     ║", 6, 1, 7)
  65.         call mhscr(page,"║  Activate with Alt X ║", 7, 1, 7)
  66.         call mhscr(page,"╚══════════════════════╝", 8, 1, 7)
  67.  
  68.         call GET.NAMES(NAM$(),1)        'get names, first time
  69.  
  70.         call GET.DATA.TIME(CODE,NEW.TIME$)   'get name-file time, first time
  71.  
  72.         old.time$=new.time$
  73.  
  74.         '----------------------------- INITIALIZE -----------------------------
  75.  
  76.         call mhmt16(dtaseg,box)                 'call for space
  77.         call mhwind(stack$, 0,dtaseg, 0, 0, 0, 0, 0, 0, 2,box*16,ecode)
  78.  
  79.         if ecode <> 0 then call mach2.error("MHWIND",ecode)
  80.  
  81.         '----------------- ALLOCATE STRING SPACE FOR SCREEN STORAGE -----------
  82.  
  83.         hot.oper= 3
  84.         call hotkey(hot.oper,kscan,kshift,h.ecode)
  85.  
  86.         if h.ecode <> 0 then call hotkey.error(hot.oper,ecode)
  87.  
  88.         '-------------------- WHERE TO STORE SCREEN IMAGE ---------------------
  89.  
  90.         kscan  = 4000                           'bytes to save text only
  91.         call hotkey( 4,kscan,kshift,h.ecode)    'set storage segment and number of bytes
  92.         if h.ecode <> 0 then call hotkey.error(hot.oper,ecode)
  93.  
  94.         '----------------------- SWAP TO RAM DISK -----------------------------
  95.  
  96.         goto NO.SWAP                            'rem this line to use swap to disk
  97.  
  98.         dir$     = "f:\"                        'RAM Disk to swap
  99.         kshift   = varptr(dir$)                 'get segment address
  100.         kscan    = 0
  101.         hot.oper = 7
  102.  
  103.         call hotkey(hot.oper,kscan,kshift,h.ecode)      'set storage segment and number of bytes
  104.         if h.ecode <> 0 then call hotkey.error(hot.oper,ecode)
  105.  
  106. NO.SWAP:
  107.  
  108.         '----------------------- TERMINATE AND STAY RESIDENT ------------------
  109.  
  110.         hot.oper= 0
  111.         locate last.cursor.line+1,1,1,start.line,end.line       'cursor location
  112.  
  113. HOT.KEY:
  114.  
  115.         kscan=&h2D: kshift=8: h.ecode= 0
  116.         call hotkey(hot.oper,kscan,kshift,h.ecode)     'Terminate and Stay Res. HOT-KEY = Alt X
  117.  
  118.         '--- get monitor type
  119.         call get.monitor (monitor,nor,hi,rev,curs.normal,curs.insert,start.line,end.line)
  120.  
  121.         if last.monitor <> monitor then _
  122.            call mhvideo(monitor): last.monitor=monitor  ' change monitor
  123.  
  124.         if (kscan=2 and monitor=&hB800) or _
  125.            (kscan=3 and monitor=&hB800) or _
  126.            (kscan=7 and monitor=&hB000) then goto NO.CHANGE
  127.  
  128.         hot.oper= 2
  129.         call hotkey(hot.oper, 3,kshift,h.ecode)         'change video mode
  130.  
  131.         if h.ecode <> 0 then call hotkey.error(hot.oper,ecode)
  132.  
  133. NO.CHANGE:
  134.  
  135.         if h.ecode < 0 or h.ecode > 1 then call hotkey.error(hot.oper,ecode)
  136.  
  137.  
  138.         '------------- CHECK IF DATA-FILE HAS BEEN UPDATE AND RE-READ ---------
  139.  
  140.         if h.ecode = 1 then goto DRAW.BOX
  141.  
  142.         call GET.DATA.TIME(CODE,NEW.TIME$)                   'get datafiles date
  143.         if code=258 then goto HOT.KEY                   'data file missing
  144.  
  145.         call GET.HR.MIN.SEC(OLD.TIME$,NEW.TIME$,OLD.SECONDS#,NEW.SECONDS#)  'split time
  146.  
  147.         if old.seconds# <> new.seconds# then call GET.NAMES(NAM$(),2): _
  148.                                      old.time$ = new.time$
  149.  
  150.  
  151.         '---------------------------- DRAW BOX --------------------------------
  152.  
  153. DRAW.BOX:
  154.  
  155.         call mhwind(stack$,hi,dtaseg, 4, 0, 2, 1,23,80, 0, 2,ecode)
  156.  
  157.         if ecode <> 0 then call mach2.error("MHWIND",ecode)
  158.  
  159.         '---------------------------- PRINT TEXT ------------------------------
  160.  
  161.         first.record = 1
  162.         rec.per.page =20
  163.         current.page = 1
  164.         cursor.line  = 3
  165.         old.cur.line = 3
  166.  
  167. PRINT.TEXT:
  168.  
  169.         '------------------------------ HEADING -------------------------------
  170.  
  171. ''FAX DIALER: Page 00 of 99    PgDn          Select   ──┘ Dial   <Esc> Quit ▓
  172. ''FAX DIALER: Page 00 of 99         PgUp     Select   ──┘ Dial   <Esc> Quit ▓
  173. ''FAX DIALER: Page 00 of 99    PgDn PgUp     Select   ──┘ Dial   <Esc> Quit ▓
  174.  
  175.         current.page$=mid$(str$(current.page),2,len(str$(current.page))-1)
  176.         last.page$   =mid$(str$(pages),       2,len(str$(pages))       -1)
  177.  
  178.         if len(current.page$) < 2 then current.page$ = " "+current.page$
  179.         if len(last.page$)    < 2 then last.page$    = " "+last.page$
  180.  
  181.         if current.page = 1 then _
  182.            call mhscr(page,"  FAX DIALER: Page "+current.page$+" of "+last.page$+"    PgDn          Select   ──┘ Dial   <Esc> Quit  ", 1, 1,rev)
  183.  
  184.         if current.page = pages then _
  185.            call mhscr(page,"  FAX DIALER: Page "+current.page$+" of "+last.page$+"         PgUp     Select   ──┘ Dial   <Esc> Quit  ", 1, 1,rev)
  186.  
  187.         if current.page > 1 and current.page < pages  then _
  188.            call mhscr(page,"  FAX DIALER: Page "+current.page$+" of "+last.page$+"    PgDn PgUp     Select   ──┘ Dial   <Esc> Quit  ", 1, 1,rev)
  189.  
  190.  
  191.         '----------------------------- PRINT NAMES ----------------------------
  192.  
  193.         row= 2
  194.  
  195.         for x=first.record to first.record+19
  196.            row=row+1: call mhscr(page,nam$(x),row, 2,nor)
  197.         next
  198.  
  199.         '--- PRINT REVERSE bar
  200.  
  201. PRINT.LINE:
  202.  
  203.         call mhscatt(page,old.cur.line, 2,nor,78)
  204.         call mhscatt(page, cursor.line, 2,rev,78)
  205.  
  206.  
  207.         '------------------------------ GET KEY -------------------------------
  208.  
  209. GET.KEY:
  210.  
  211.         kscan=0
  212.         call mhkclr(stack$,curs.normal,lin,col,page,kshift,kscan,kascii)
  213.  
  214.         if kscan=&h1c then call DIAL(CURSOR.LINE): kscan=0: goto get.key   'dial w/ <cr>
  215.  
  216.         '--- Cursor Dn
  217.  
  218.         if kscan=&h50 then _
  219.            if cursor.line <22 then _
  220.               old.cur.line=cursor.line: cursor.line=cursor.line+1: goto PRINT.LINE _
  221.               else _
  222.            if cursor.line =22 then _
  223.               old.cur.line=cursor.line: cursor.line=  3:           goto PRINT.LINE
  224.  
  225.         '--- Cursor Up
  226.  
  227.         if kscan=&h48 then _
  228.            if cursor.line > 3 then _
  229.               old.cur.line=cursor.line: cursor.line=cursor.line-1: goto PRINT.LINE _
  230.               else _
  231.            if cursor.line = 3 then _
  232.               old.cur.line=cursor.line: cursor.line=22:            goto PRINT.LINE
  233.  
  234.         '--- PgDn
  235.  
  236.         if kscan=&h51 then _
  237.            if rec.per.page < last.rec then _
  238.               first.record=first.record+20: _
  239.               rec.per.page=rec.per.page+20: _
  240.               current.page=current.page+1: _
  241.               for x=3 to 22: call mhscr(page,space$(78),x, 2,nor): next: _
  242.               cursor.line= 3: old.cur.line= 3: goto PRINT.TEXT _
  243.            else goto GET.KEY
  244.  
  245.         '--- PgUp
  246.  
  247.         if kscan=&h49 then _
  248.            if first.record > 1 then _
  249.               first.record=first.record-20: _
  250.               rec.per.page=rec.per.page-20: _
  251.               current.page=current.page-1: _
  252.               for x=3 to 22: call mhscr(page,space$(78),x, 2,nor): next: _
  253.               cursor.line= 3: old.cur.line= 3: goto PRINT.TEXT _
  254.            else goto GET.KEY
  255.  
  256.  
  257.         if kscan=&h01 then goto HOT.KEY                'if Esc then hide again
  258.  
  259.         ' Take REM out of the next line to create key 1 which releases memory Stayres is using
  260.  
  261.         '''' if kscan=&h02 then hot.oper= 9: goto hot.key   'if number 1 entered then end
  262.  
  263.         goto GET.KEY
  264.  
  265.  
  266.         '**********************************************************************
  267.         ' END
  268.         '**********************************************************************
  269.  
  270.         '>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  271.         '>>>>>>>>>>>>>>>>>>>>>>>>>>>>> SUBROUTINES <<<<<<<<<<<<<<<<<<<<<<<<<<<<
  272.         '>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  273.  
  274. SUB DIAL(CURSOR.LINE) STATIC
  275.  
  276.         page=0: num$=space$(22)+chr$(0)
  277.         call mhrscr(page,num$,cursor.line,57,23)     'read number
  278.  
  279.         ln.num=len(num$)
  280.  
  281.         '--- strip trailing spaces from string
  282.  
  283. LOOP1:  if ln.num > 0 then _
  284.            if mid$(num$,ln.num,1)=" " then _
  285.                ln.num=ln.num-1: goto LOOP1
  286.  
  287.         num$ = left$(num$,ln.num): ln.num=1
  288.  
  289.         '--- strip leading spaces from string
  290.  
  291. LOOP2:  if ln.num < len(num$) then _
  292.            if mid$(num$,ln.num,1)=" " then _
  293.                ln.num=ln.num+1: goto LOOP2
  294.  
  295.         num$ = mid$(num$,ln.num)
  296.  
  297.         '--- Open COM 1 Port
  298.  
  299.         OPEN "COM1:1200,E,7,1,CS,DS,CD" AS #1
  300.  
  301.         call OPEN.WINDOW                                'open small window
  302.  
  303.         '--- Dial
  304.  
  305.         print #1, "ATM1 S11=40DT"+num$
  306.  
  307.         '--- Print number on screen
  308.  
  309.         col=int((80-len(num$))/2)                       'print middle of screen
  310.         call mhscr(page,num$,11,col,hi)                 'print number at screen center
  311.  
  312.         ''' 10     ╔═══════════════════════════════════════╗
  313.         ''' 11     ║        12345678901234567890123        ║
  314.         ''' 12     ║            After Dial Tone            ║
  315.         ''' 13     ║     Press Fax Machines Start Button   ║
  316.         ''' 14     ║ and Press any key on keybord to SEND  ║
  317.         ''' 15     ╚═══════════════════════════════════════╝
  318.  
  319.         call mhscr(page,"After Dial Tone",12,33,hi)
  320.         call mhscr(page,"Press Fax Machines Start Button",13,26,hi)
  321.         call mhscr(page,"and Press any key on keybord to SEND",14,22,hi)
  322.  
  323.         call mhkclr(stack$,curs.normal,lin,col,page,kshift,kscan,kascii)
  324.  
  325.         call CLOSE.WINDOW                               'close small window
  326.  
  327.         print #1, "ATM1 H0 Z"                           'hang up
  328.         close
  329.  
  330. end sub         'end sub dial
  331.  
  332.  
  333.         '************************ GET MONITOR TYPE ****************************
  334.  
  335. SUB GET.MONITOR(MONITOR,NOR,HI,REV,CURS.NORMAL,CURS.INSERT,START.LINE,END.LINE) STATIC
  336.  
  337.         def seg=0
  338.  
  339.         if (peek(&h410) and &h30)=&h30 then _
  340.            nor= 7: hi=15: rev=112: curs.normal=3085: curs.insert=1293: _
  341.            start.line=12: end.line=13: _
  342.            monitor=&hB000: _
  343.            color 7,0,0 _
  344.         else _
  345.            nor=30: hi=31: rev= 79: curs.normal=1543: curs.insert=1031: _
  346.            start.line= 6: end.line= 7: _
  347.            monitor=&hFFFF: _                    '&hB800 for color, &hFFFF for no snow-check
  348.            color 7,0,0
  349.  
  350.         def seg
  351.  
  352.         call mhvideo(monitor)
  353.  
  354. end sub         'get.monitor mono / color
  355.  
  356.  
  357.         '************************** GET NAMES *********************************
  358.  
  359. 'Name etc -------------------------------------------x 12345678901234567890123 ║
  360.  
  361. SUB GET.NAMES(NAM$(1),SEQ) STATIC
  362.  
  363.         open filename$ for input as #1
  364.  
  365.         line input #1, nam$(0)  'skip 2 top lines
  366.         line input #1, nam$(0)
  367.  
  368.         if seq=2 then call OPEN.WINDOW: _
  369.            call mhscr(page,"Data Changed, Reloading",11,22,hi) else _
  370.            call mhscr(page,"Loading Data from File", 9, 1, 7): locate 9,24
  371.  
  372.         rec.count=0: row=11: col=45
  373.  
  374.         while not eof(1)
  375.            rec.count=rec.count+1: line input #1, nam$(rec.count)
  376.            if len(nam$(rec.count)) < 78 then nam$(rec.count)=nam$(rec.count)+space$(78-len(nam$(rec.count)))
  377.            if seq=1 then _                                              '1 st read
  378.               if (rec.count/20)-int(rec.count/20) = 0 then print "*";   'print on every 20 th record
  379.            if seq=2 then _                                              '2 nd read
  380.               if (rec.count/20)-int(rec.count/20) = 0 then col=col+1: _
  381.                   locate row,col: print "*";                            'print on every 20 th record
  382.            if col=58 then col=21: row=row+1
  383.         wend
  384.  
  385.         last.cursor.line=csrlin: close
  386.         last.rec=rec.count: pages=int(rec.count/20)+1
  387.  
  388.         if seq=2 then call CLOSE.WINDOW
  389.  
  390. end sub         'get.names
  391.  
  392.  
  393.         '*********************** GET DATA FILE TIME ***************************
  394.  
  395. SUB GET.DATA.TIME(ECODE,NEW.TIME$) STATIC
  396.  
  397.         new.time$=space$(8): dat$=space$(8)
  398.  
  399.         '-- open file
  400.         file.name$=filename$+chr$(0)
  401.         oper = 0
  402.         call mhfile(stack$,oper,file.name$,mode,attr,handle,ecode)
  403.         if ecode <> 0 then call mach2.error("OPEN FILE",ecode)
  404.  
  405.         '-- get file time
  406.         oper = 1
  407.         call mhfdate(stack$,handle,oper,new.time$,dat$,ecode)
  408.         if ecode <> 0 then call mach2.error("FDATE ERROR",ecode)
  409.  
  410.         '-- close file
  411.         oper = 0
  412.         file.name$=""
  413.         call mhfile(stack$,oper,file.name$,mode,attr,handle,ecode)
  414.         if ecode <> 0 then call mach2.error("CLOSE FILE",ecode)
  415.  
  416. end sub         'get.data.time
  417.  
  418.  
  419.         '************************ SPLIT TIME **********************************
  420.  
  421. SUB GET.HR.MIN.SEC(OLD.TIME$,NEW.TIME$,OLD.SECONDS#,NEW.SECONDS#) STATIC
  422.  
  423.         '--- set a number corresponding to old file time
  424.  
  425.         old.seconds# = val(mid$(old.time$,7,2))
  426.         old.seconds# = old.seconds# + val(mid$(old.time$,4,2))*60
  427.         old.seconds# = old.seconds# + val(mid$(old.time$,1,2))*1.11
  428.  
  429.         '--- set a number corresponding to new file time
  430.  
  431.         new.seconds# = val(mid$(new.time$,7,2))
  432.         new.seconds# = new.seconds# + val(mid$(new.time$,4,2))*60
  433.         new.seconds# = new.seconds# + val(mid$(new.time$,1,2))*1.11
  434.  
  435. end sub 'get.hr.min.sec
  436.  
  437.         '************************ OPEN SMALL BOX ******************************
  438.  
  439. SUB OPEN.WINDOW STATIC
  440.  
  441.         '--- Save text under small window
  442.  
  443.         call mhwind(stack$, 0,dtaseg, 1,page,10,20,15,60, 1, 0,ecode)
  444.         if ecode <> 0 then call mach2.error("MHWIND",ecode)
  445.  
  446.         '--- clear small window
  447.  
  448.         for row=10 to 15
  449.            call mhscr(page,space$(40), row,20,nor)
  450.         next
  451.  
  452.         '--- draw small box
  453.  
  454.         call mhwind(stack$,hi,dtaseg, 4,page,10,20,15,60, 1, 1,ecode)
  455.         if ecode <> 0 then call mach2.error("MHWIND",ecode)
  456.  
  457.         ''' 10     ╔═══════════════════════════════════════╗
  458.         ''' 11     ║                                       ║
  459.         ''' 12     ║                                       ║
  460.         ''' 13     ║                                       ║
  461.         ''' 14     ║                                       ║
  462.         ''' 15     ╚═══════════════════════════════════════╝
  463.  
  464. end sub         'open.window
  465.  
  466.         '************************* CLOSE SMALL BOX ****************************
  467.  
  468. SUB CLOSE.WINDOW STATIC
  469.  
  470.         kscan=0
  471.         call mhwind(stack$, 0,dtaseg, 2,page,10,20,15,60, 1, 0,ecode)   'Restore small window
  472.         if ecode <> 0 then call mach2.error("MHWIND",ecode)
  473.  
  474. end sub         'close.window
  475.  
  476.         '************************ MACH2 ERROR DISPLAY *************************
  477.  
  478.         defint a-z
  479.  
  480. SUB MACH2.ERROR(OPERATION$,ECODE) STATIC
  481.  
  482.         call mhscr( 0,operation$+", Mach2 Error ="+str$(ecode), 1, 1,15)
  483.  
  484.         kscan=0
  485.         call mhkclr(stack$,curs.normal,lin,col,page,kshift,kscan,kascii)
  486.  
  487.         end sub         'mach2.error
  488.  
  489.  
  490.         '************************ HOTKEY ERROR DISPLAY ************************
  491.  
  492.         defint a-z
  493.  
  494. SUB HOTKEY.ERROR(OPERATION,ECODE) STATIC
  495.  
  496.         if ecode=-1 then error$="Don't invoke Operation or 7 after TSR"
  497.         if ecode= 1 then error$="DOS functions not available"
  498.         if ecode= 2 then error$="Not enough memory for TSR"
  499.         if ecode= 3 then error$="TSR was unsuccesfull, terminate"
  500.         if ecode= 4 then error$="Use DOS 3.0 or later"
  501.         if ecode= 5 then error$="You have to Link STAYRES.OBJ before Your code"
  502.         if ecode= 6 then error$="DOS busy,unsuccesfull attempt to release memory"
  503.         if ecode= 7 then error$="Unsuccesfull attempt to un-install program"
  504.         if ecode= 8 then error$="Hotkey needs to know where to store the screen image"
  505.  
  506.         if ecode=10 then error$="Files SR00 - SR99 Used already"
  507.  
  508.         '------------------------ show error ----------------------------------
  509.  
  510.         call mhscr( 0,"Operation = "+str$(operation)+" Hotkey Error ="+str$(ecode)+" , "+error$, 1, 1,15)
  511.  
  512.         kscan=0
  513.         call mhkclr(stack$,curs.normal,lin,col,page,kshift,kscan,kascii)
  514.  
  515.         end sub         'hotkey.error
  516.  
  517.  
  518.         '************************ SYSTEM ERROR DISPLAY ************************
  519.  
  520.         defint a-z
  521.  
  522. SUB MHDOS2.ERROR(OPERATION$,ECODE) STATIC
  523.  
  524.         retcd=ecode
  525.  
  526.         if retcd=255 then goto NO.ERRORS
  527.         if retcd>256 then goto HI.CODE
  528.  
  529.         if retcd=0 then error$="Attempt to write on write-protected diskette"
  530.         if retcd=1 then error$="Unknown unit"
  531.         if retcd=2 then error$="Drive not ready"
  532.         if retcd=3 then error$="Unknown command"
  533.         if retcd=4 then error$="Data error (CRC)"
  534.         if retcd=5 then error$="Bad request structure length"
  535.         if retcd=6 then error$="Seek error"
  536.         if retcd=7 then error$="Unknown media type"
  537.         if retcd=8 then error$="Sector not found"
  538.         if retcd=9 then error$="Printer out of paper"
  539.         if retcd=10 then error$="Write fault"
  540.         if retcd=11 then error$="Read fault"
  541.         if retcd=12 then error$="General failure"
  542.  
  543.         goto SHOW.ERR
  544.  
  545. HI.CODE:
  546.         retcd=retcd-256
  547.         if retcd=1 then error$="Invalid function number"
  548.         if retcd=2 then error$="File not found"
  549.         if retcd=3 then error$="Path not found"
  550.         if retcd=4 then error$="Too many open files"
  551.         if retcd=5 then error$="Access denied"
  552.         if retcd=6 then error$="Invalid handle"
  553.         if retcd=7 then error$="Memory control blocks destroyed"
  554.         if retcd=8 then error$="Insufficient memory"
  555.         if retcd=9 then error$="Invalid memory block address"
  556.         if retcd=10 then error$="Invalid environment"
  557.         if retcd=11 then error$="Invalid format"
  558.         if retcd=12 then error$="Invalid access code"
  559.         if retcd=13 then error$="Invalid data"
  560.         if retcd=15 then error$="Invalid drive was specified"
  561.         if retcd=16 then error$="Attempted to remove the current directory"
  562.         if retcd=17 then error$="Not same device"
  563.         if retcd=18 then error$="No more files"
  564.         if retcd=19 then error$="Disk write protected"
  565.         if retcd=20 then error$="Unknown unit"
  566.         if retcd=21 then error$="Drive not ready"
  567.         if retcd=22 then error$="Unknown command"
  568.         if retcd=23 then error$="Data Error (CRC)"
  569.         if retcd=24 then error$="Bad request structure lenght"
  570.         if retcd=25 then error$="Seek error"
  571.         if retcd=26 then error$="Unknown media type"
  572.         if retcd=27 then error$="Sector not found"
  573.         if retcd=28 then error$="Printer out of paper"
  574.         if retcd=29 then error$="Write fault"
  575.         if retcd=30 then error$="Read fault"
  576.         if retcd=31 then error$="General failure"
  577.         if retcd=32 then error$="Sharing violation"
  578.         if retcd=33 then error$="Lock violation"
  579.         if retcd=34 then error$="Invalid disk change"
  580.         if retcd=35 then error$="FCB unavaialable"
  581.         if retcd=36 then error$="Sharing buffer overflow"
  582.         if retcd=50 then error$="Network request not supported"
  583.         if retcd=51 then error$="Remote computer not listening"
  584.         if retcd=52 then error$="Duplicate name on network"
  585.         if retcd=53 then error$="Network name not found"
  586.         if retcd=54 then error$="Network busy"
  587.         if retcd=55 then error$="Network device no longer exist"
  588.         if retcd=56 then error$="Net BIOS command limit exeeded"
  589.         if retcd=57 then error$="Network adapter hardware error"
  590.         if retcd=58 then error$="Incorrect response from network"
  591.         if retcd=59 then error$="Unexpected network error"
  592.         if retcd=60 then error$="Uncompatible remote adapter"
  593.         if retcd=61 then error$="Print Queue full"
  594.         if retcd=62 then error$="Not enough space for print file"
  595.         if retcd=63 then error$="Print file deleted"
  596.         if retcd=64 then error$="Network name deleted"
  597.         if retcd=65 then error$="Access denied"
  598.         if retcd=66 then error$="Network device type incorrrect"
  599.         if retcd=67 then error$="Network name not found"
  600.         if retcd=68 then error$="Network name limit exeeded"
  601.         if retcd=69 then error$="Net BIOS session limit exeeded"
  602.         if retcd=70 then error$="Temporarily paused"
  603.         if retcd=71 then error$="Network request not accepted"
  604.         if retcd=72 then error$="Print/disk redirection paused"
  605.         if retcd=80 then error$="File alredy exist"
  606.         if retcd=82 then error$="Cannot make directory entry"
  607.         if retcd=83 then error$="Interupt 24H failure"
  608.         if retcd=84 then error$="Too many redirections"
  609.         if retcd=85 then error$="Duplicate redirection"
  610.         if retcd=86 then error$="Invalid Password"
  611.         if retcd=87 then error$="Invalid parameter"
  612.         if retcd=88 then error$="Network device fault"
  613.  
  614. SHOW.ERR:
  615.         if retcd <> 255 then cls: _
  616.            call mhscr( 0,operation$+",  Error ="+str$(retcd)+", "+error$, 1, 1,15): _
  617.                 else goto NO.ERRORS
  618.  
  619.         kscan=0
  620.         call mhkclr(stack$,curs.normal,lin,col,page,kshift,kscan,kascii)
  621.  
  622. NO.ERRORS:
  623.         end sub         'error display
  624.  
  625.  
  626.